<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${sys.sortName!''}</title>

<link rel="stylesheet" type="text/css" href="${basePath}/res/js/jquery-easyui/themes/gray/easyui.css">
<script type="text/javascript" src="${basePath}/res/js/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}/res/js/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${basePath}/res/js/common.js"></script>

<link rel="stylesheet" type="text/css" href="${basePath}/login/${sys.loginCode!''}/css/login.css">

<script type="text/javascript">
	if (self != top) {  //主页不允许在iframe中
		top.window.location.reload();
	}
</script>


</head>
<body style="visibility: hidden;">

    <form name="form1" class="easyui-form" method="post" action="" data-options="novalidate:true" id="ff">
        <div class="main">
            <div class="all">
                <div class="box">
                    <div class="logo_bg">
                        <p>
                            
                        </p>
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <p class="login_tab">
                            <a href="#" class="cur">账号登录</a>
                        </p>
                        <div class="content_box content_box01 basefix">
                            <div class="content_left">
                                <p>
                                    <span style="text-align:center;">
                                        用户名</span><input name="user_name"  id="user_name" type="text" value="admin" class="easyui-validatebox" data-options="required:true" tabindex="1" />
                                </p>
                                <p>
                                    <span style="text-align:center;">
                                        密　码</span><input name="password" id="password" type="password" value="123456" class="easyui-validatebox" data-options="required:true" tabindex="2" />
                                </p>
                                <!-- <div id="showVfc" name="showVfc" class="code_box basefix" style="display:none;">
                                    <p class="code">
                                        <span>
                                            <label>
                                                验证码</label></span><input name="txtVfc" type="text" id="txtVfc" tabindex="3" class="vertxt" autocomplete="off" />
                                    </p>
                                    <input type="image" name="ImgBtnVfc" id="ImgBtnVfc" class="code_img" src="" style="border-width:0px;" />
                                    <a href="#" onclick="fGetCode();" class="vague">看不清</a>
                                </div>
                                <span id="lblUserInfoUID"></span> -->
                                <a href="javascript:login();" id="btnLogin"  style="text-decoration:none; color:#fff;" class="login">登 录</a>
                                <!-- <a href="#" class="forget">忘记密码？</a>
                                <span id="lblErrorMessage" class="user_null"></span> -->
                            </div>
                            
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </form>

    <div class="vbk_footer">
        <div class="footer_bg" style="text-align: center;">
            <div class="footer_content">
               <p>
                   
                </p>
                <p>
                    技术支持：soft361@foxmail.com
                </p>
            
            </div>
        </div>
       
    </div>

    <script type="text/javascript">
        $(function() {
            //获取焦点样式
            $("#ff :input").focus(function() {
                $(this).parent().addClass("actived");
            }).blur(function() {
                $(this).parent().removeClass("actived");
            });

            //设置默认焦点,并将光标移到最后
            {
                var theValue = $("#user_name").val();
                $("#user_name").val("").focus().val(theValue); //其原理就是获得焦点后重新把自己复制粘帖一下 
            }

            //处理回车事件
            $(window).keydown(function(event) { //按键事件
                if (event.keyCode == 13) //回车 或 tab键
                {
                    var theId = $(':focus').attr("id");
                    if (theId == "user_name") { //如果焦点是用户名，则将焦点称到密码
                        var theValue = $("#password").val();
                        $("#password").val("").focus().val(theValue);
                    } else if (theId == "password") { //如果焦点是密码，则直接登录
                        login();
                    }
                }
            });


        });

        function login() {
            if ($("#ff").form('enableValidation').form('validate')) {
                var param = {
                    "user_name": $(":input[name='user_name']").val(),
                    "password": $(":input[name='password']").val(),
                    "sysCode":"${sys.code!''}"
                };
                $.post("${basePath}/login", param, function(data) {
                    if (data.code == "01") {
                        location.href = "${basePath}/base/main/index/${sys.code!''}";
                    } else {
                        showWarnMsg(data.msg);
                    }
                });
            }
        }
    </script>
</body>

</html>